import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import dep_management from "./views/nav1/dep_management.vue";
import user_management from "./views/nav1/user_management.vue";
import Role from "./views/nav2/Permission.vue";
import Permission from "./views/nav2/Role.vue";
import echarts from "./views/charts/echarts.vue";
import noPermission from "./views/noPermission.vue";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: "Organization",
        iconCls: 'el-icon-s-management',//图标样式class
        children: [
            { path: '/dep_management', component: dep_management, name: '部门管理' },
            { path: '/user_management', component: user_management, name: '员工管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: "permission",
        iconCls: 'el-icon-message',//图标样式class
        hidden: true,
        children: [
            { path: '/noPermission', component: noPermission, name: '没权限',hidden: true },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'System Management',
        iconCls: 'el-icon-user',
        leaf: false,//只有一个节点
        children: [
            { path: '/role', component: Role, name: '角色管理' },
            { path: '/permission', component: Permission, name: '权限管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        hidden: false,
        children: [
            { path: '/charts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;